﻿using System;

namespace Moqikaka.Model
{
    /// <summary>
    /// 登录日志
    /// </summary>
    public class LoginLog
    {


        #region 构造函数
        /// <summary>
        /// 构造函数
        /// </summary>
        public LoginLog() { }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dr">数据行</param>
        public LoginLog(System.Data.DataRow dr)
        {
            this.PartnerId = Convert.ToInt32(dr[CommonPropertyName.PartnerId]);
            this.UserId = dr[CommonPropertyName.UserId].ToString();
            this.PlayerId = Guid.Parse(dr[CommonPropertyName.PlayerId].ToString());
            this.LoginTime = Convert.ToDateTime(dr[CommonPropertyName.LoginTime]);

        }

        #endregion

        #region 属性
        /// <summary>
        /// 合作商Id
        /// </summary>
        public Int32 PartnerId { get; private set; }

        /// <summary>
        /// 平台用户Id
        /// </summary>
        public String UserId { get; private set; }

        /// <summary>
        /// 玩家ID
        /// </summary>
        public Guid PlayerId { get; set; }

        /// <summary>
        /// 登录时间
        /// </summary>
        public DateTime LoginTime { get; set; }



        #endregion

    }
}
